/**
 * Created by yujia on 16/3/4.
 */
//import js
//document.write("<script src='resources/js/jquery.flexisel.js' type='text/javascript' />")
//document.write("<script src='resources/js/jquery-1.11.1.min.js' type='text/javascript' />")
//document.write("<script src='resources/js/responsiveslides.min.js' type='text/javascript' />")


$(function(){
    //topSlider
    $("#topSlider").responsiveSlides({
        auto: true,
        pager: true,
        nav: false,
        speed: 500,
        namespace: "callbacks",
        before: function(){
            //to add
        },
        after: function(){
            //to add
        }
    });

    //flexiseDemo1
    $("#flexiselDemo1").flexisel({
        visibleItems: 3,   //一行显数的个数
        animationSpeed: 200, //动画时间
        autoPlay: false,     //自动播放
        autoPlaySpeed: 3000, //播放间隔时间
        pauseOnHover: true,  //鼠标悬浮是否停止播放
        clone:false,         //是否使用克隆
        enableResponsiveBreakpoints: true, //是否开启响应式
        responsiveBreakpoints: {
            portrait: {    //项目名，可随意命名
                changePoint: 480,  //屏幕最大像素，意思为当屏幕最大像素为480时，只显示一个Item，即例子只显示一张图片。
                visibleItems: 1   //只显示一个Item，下面的雷同
            },
            landscape: {
                changePoint: 640,
                visibleItems: 2
            },
            tablet: {
                changePoint: 768,
                visibleItems: 3
            }
        }
    });
});

//$("#topMenu_home").onclick(function(){
//    $.post("/login",
//        {
//            username: "yujia",
//            password: "123"
//        },
//        function (gender,age) {
//        alert("gender:"+gender+";age:"+age);
//    });
//});
